import { http } from '@/utils/http'

export interface LoginItem {
  code: string
}

/** POST 请求 */
export const loginAPI = (code: string) => {
  return http.post<LoginItem>('/wxLoginBak', { code })
}
export const logoutAPI = () => {
  return http.post<any>('/logout', {})
}
export const updateUserAPI = (e: any) => {
  return http.post<any>('/updateWxUser', e)
}
export const getLoginPhoneAPI = (e: any) => {
  return http.post<LoginItem>('/wxloginPhone', e)
}


export const httpWeChatLogin = (e: any) => {
  return http.post<LoginItem>('/blade-auth/oauth/token/samllchart', e)
}